#ifndef ControlH
#define ControlH
#include <MOOSLIB/MOOSApp.h>
#include <vector>
using namespace std;
typedef struct _state{
	double u;
	double v;
	double w;
	
	double p;
	double q;
	double r;
	
	double x;
	double y;
	double z;
	
	double phi;
	double theta;
	double psi;	
} state;

typedef struct _destination{
	double x;
	double y;
	double z;
} destination;

class CControl : public CMOOSApp
{
public:
        CControl();
        virtual ~CControl();
protected:
        bool OnNewMail(MOOSMSG_LIST &NewMail);
        bool Iterate();
        bool OnConnectToServer();
        bool OnStartUp();
        /*We want to subscribe to "State". Control values are obtained from the system ROV*/
        void DoRegistrations();
        bool OnState(CMOOSMsg& msg);
        bool OnDestination(CMOOSMsg& msg);
private:
	state _statePrev;
	destination _destPrev;		
};
#endif

